%%%%%
%%
%% This file sets up the Char, PC, NPC, and Name datatypes and creates
%% macros for each.  These are for characters in the game.  Here you
%% use the fields in Char to assign elements to each character.
%%
%%
%%
%% \MYname (and the player name) is parsed by \parsename, the command
%% provided by LaTeX/parsename.sty.  See that file and
%% Extras/README-namemappings for ways to take advantage of this.
%%
%%
%%
%% \MYsex is set to either \male, \female, \neuter, or \ambiguous, as
%% correct for the character.  \mfn{<masculine>}{<feminine>}{<neuter>}
%% will produce the correct form based on the current value of \MYsex
%% (\ambiguous will lead to <masculine>/<feminine>).  \mfn should only
%% be used within the scope of a Char macro.  \mf{<masc>}{<fem>} works
%% just like \mfn with the <neut> arg left blank.
%%
%% \pronoun{<command>}{<masc>}{<fem>}{<neut>} makes <command> a
%% wrapper around \mfn.  It is used to create a list of
%% gender-sensitive macros, mostly pronouns.  For example, given
%% \pronoun{\They}{He}{She}{It}, \cJamesBond{\They} will produce He.
%%
%%
%%
%% \badgetrue and \badgefalse toggle whether or not a Char macro will
%% produce a namebadge.
%%
%% \statstrue and \statsfalse will toggle the statcard.
%%
%% \skillstrue and \skillsfalse will toggle the skill list.  The skill
%% list prints both skills and stats (even if \statsfalse is set).
%%
%% \sheettrue and \sheetfalse will toggle the character sheet.
%%
%% \listtrue and \listfalse toggle whether the Char macro can display
%% in the playerlist.
%%
%% \labeltrue and \labelfalse toggle the box label.
%%
%%
%%
%% Some of the Char datatype's setup is in LaTeX/gametex.sty, to keep
%% this file short.
%%
%%%%%



%%%%%
%% If a field is declared by \F, it must be given a value by \s inside
%% \NEW, even if it's blank.  If you want it to be optional, declare
%% it with \FD<field> {<default>} here.
%%
%% Use \newstat to create stats (below, in \PRESETS{Char}).  The
%% <default> value is used unless the given Char macro sets the field.
%% For example:
%%
%%   \newstat\MYhp	{Hit Points}{HP}{5}
%%
%% would give character a Hit Points stat, abbreviated HP, referenced
%% as the \MYhp field, that defaults to 5.
\PRESETS{Char}{
  \FD\MYdesc	{} %% badge description

  \newstat\MYhp	{Hit Points}{HP}{5}

  \FD\MYsex	{\male} %% \male, \female, \neuter, \ambiguous
  \FD\MYrole	{} %% playerlist role
  \FD\MYgroupstr{} %% playerlist groupstring
  \FD\MYfile	{} %% character sheet filename (including .tex)
  \FS\MYtext	{\ifx\MYfile\empty\else%
		  \getextractenvs{document}{\chars/\MYfile}%
		\fi}
  \badgetrue\statstrue\skillstrue\sheettrue\listtrue\labeltrue
  }

\POSTSETS{Char}{
  \resolvestats
  }


%%%%%
%% pronouns and similar gender-based macros
%%
%% \male, \female, \neuter, \ambiguous
%% \mfn{<masculine>}{<feminine>}{<neuter>}
%% \mf{<masculine>}{<feminine>}
%% \pronoun{<command>}{<masculine>}{<feminine>}{<neuter>}
\def\male{0}\def\female{1}\def\neuter{2}\def\ambiguous{3}
\newcommand{\mfn}[3]{\ifcase\MYsex#1\or#2\or#3\else#1/#2\fi}
\newcommand{\mf}[2]{\mfn{#1}{#2}{}}
\newcommand{\pronoun}[4]{\def#1{\mfn{#2}{#3}{#4}}}

\pronoun{\they}		{he}{she}{it}
\pronoun{\They}		{He}{She}{It}
\pronoun{\them}		{him}{her}{it}
\pronoun{\Them}		{Him}{Her}{It}
\pronoun{\their}	{his}{her}{its}
\pronoun{\Their}	{His}{Her}{Its}
\pronoun{\theirs}	{his}{hers}{its}
\pronoun{\Theirs}	{His}{Hers}{Its}
\pronoun{\themself}	{himself}{herself}{itself}
\pronoun{\Themself}	{Himself}{Herself}{Itself}
\pronoun{\spouse}	{husband}{wife}{spouse}
\pronoun{\Spouse}	{Husband}{Wife}{Spouse}
\pronoun{\myspouse} {wife}{husband}{spouse}
\pronoun{\offspring}	{son}{daughter}{offspring}
\pronoun{\Offspring}	{Son}{Daughter}{Offspring}
\pronoun{\kid}		{boy}{girl}{kid}
\pronoun{\Kid}		{Boy}{Girl}{Kid}
\pronoun{\sibling}	{brother}{sister}{sibling}
\pronoun{\Sibling}	{Brother}{Sister}{Sibling}
\pronoun{\parent}	{father}{mother}{parent}
\pronoun{\Parent}	{Father}{Mother}{Parent}
\pronoun{\grandparent}	{grandfather}{grandmother}{grandparent}
\pronoun{\Grandparent}	{Grandfather}{Grandmother}{Grandparent}
\pronoun{\uncle}	{uncle}{aunt}{uncle}
\pronoun{\Uncle}	{Uncle}{Aunt}{Uncle}
\pronoun{\nephew}	{nephew}{niece}{nephew}
\pronoun{\Nephew}	{Nephew}{Niece}{Nephew}
\def\aunt{\uncle}
\def\Aunt{\Uncle}
\def\niece{\nephew}
\def\Niece{\Nephew}
\pronoun{\human}	{man}{woman}{human}
\pronoun{\Human}	{Man}{Woman}{Human}
\pronoun{\sex}		{male}{female}{neuter}
\pronoun{\Sex}		{Male}{Female}{Neuter}
\pronoun{\mysex}    {\male}{\female}{\neuter}
\pronoun{\madperson}{madboy}{madgirl}{madperson}
\pronoun{\Madperson}{Madboy}{Madgirl}{Madperson}
\pronoun{\jchild}   {boy}{gurl}{child}
\pronoun{\Jchild}   {Boy}{Gurl}{Child}
\pronoun{\ruler}    {lord}{lady}{ruler}
\pronoun{\jhuman}   {man}{voman}{human}

%%%%%
%% PC is a subtype of Char, for regular PCs.
\DECLARESUBTYPE{PC}{Char}
\PRESETS{PC}{\sd\MYgroupstr{pc}}


%%%%%
%% NPC is a subtype of Char.
\DECLARESUBTYPE{NPC}{Char}
\PRESETS{NPC}{\sd\MYgroupstr{npc}}


%%%%%
%% Name is a subtype of NPC.
%% For an in-text name.  By default, produces no packet material.
\DECLARESUBTYPE{Name}{Char}
\PRESETS{Name}{
  \badgefalse\statsfalse\skillsfalse\sheetfalse\listfalse\labelfalse
  \sd\MYgroupstr{name}
  }


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\NEW{PC}{\cAdoptee}{
  \s\MYname     {Cladius Cyclemides}
  \s\MYsex      {\male}
  \s\MYfile     {adoptee.tex}
  \s\MYnumber   {}
  \s\MYdesc     {}
  \s\MYplayer   {}
  \s\MYblues    {\bFamilyC{}}
  \s\MYgreens   {\nMakeEveryoneASpark{}}
  \s\MYabils    {\aSparkA{}\aSparkB{}\aSparkC{}\aSparkD{}}
  \s\MYitems    {}
  \s\MYwhites   {}
  \s\MYmems     {\mBondAlias{}}
}

\def\assistantNumber{???}

\NEW{PC}{\cAssistant}{
  \s\MYname     {Assistant NOT-FAMILY-A}
  \s\MYsex      {\female}
  \s\MYfile     {assistant.tex}
  \s\MYnumber   {\assistantNumber}
  \s\MYdesc     {}
  \s\MYplayer   {}
  \s\MYblues    {\bFamilyA{}\bImmortals{}}
  \s\MYgreens   {\gImmortals{assistant}}
  \s\MYabils    {\aSparkA{}\aSparkB{}\aSparkE{}}
  \s\MYitems    {}
  \s\MYwhites   {}
}

\NEW{Name}{\cBondAlias}{
  \s\MYname     {Jim Mortgage}
  \s\MYsex      {\male}
}

\NEW{Name}{\cBondAliasB}{
  \s\MYname     {Jamie Pact}
  \s\MYsex      {\male}
}

\NEW{Name}{\cBondAliasC}{
  \s\MYname     {Jimbo Stock}
  \s\MYsex      {\male}
}

\newcommand{\bondNumber}{???}

\NEW{PC}{\cBond}{
  \s\MYname     {Tenebrious Heterodyne}
  \s\MYsex      {\male}
  \s\MYfile     {bond.tex}
  \s\MYnumber   {\bondNumber}
  \s\MYdesc     {}
  \s\MYplayer   {}
  \s\MYblues    {\bImmortals{}}
  \s\MYgreens   {\gImmortals{britain}\nKillAllSparks{}}
  \s\MYabils    {}
  \s\MYitems    {}
  \s\MYwhites   {}
  \s\MYmems     {\mTrapped{}\mAssistant{}}
}

\NEW{PC}{\cConstruct}{
  \s\MYname     {Construct Spark}
  \s\MYsex      {\male}
  \s\MYfile     {construct.tex}
  \s\MYnumber   {}
  \s\MYdesc     {}
  \s\MYplayer   {}
  \s\MYblues    {\bCity{}}
  \s\MYgreens   {}
  \s\MYabils    {\aSparkA{}\aSparkD{}}
  \s\MYitems    {}
  \s\MYwhites   {}
}

\newcommand{\jbsex}{\male}

\NEW{PC}{\cJagerBad}{
  \s\MYname     {Bad Jager}
  \s\MYsex      {\jbsex}
  \s\MYfile     {jager_bad.tex}
  \s\MYnumber   {}
  \s\MYdesc     {}
  \s\MYplayer   {}
  \s\MYblues    {\bJager{}}
  \s\MYgreens   {}
  \s\MYabils    {}
  \s\MYitems    {}
  \s\MYwhites   {}
  \s\MYmems     {\mBadJagerHuman{}}
}

\NEW{PC}{\cJagerGood}{
  \s\MYname     {Good Jager}
  \s\MYsex      {\female}
  \s\MYfile     {jager_good.tex}
  \s\MYnumber   {}
  \s\MYdesc     {}
  \s\MYplayer   {}
  \s\MYblues    {\bJager{}\bImmortals{}}
  \s\MYgreens   {\gImmortals{jager}}
  \s\MYabils    {}
  \s\MYitems    {}
  \s\MYwhites   {}
  \s\MYmems     {\mGoodJagerHuman{}}

}

\NEW{PC}{\cJones}{
  \s\MYname     {Jura Del\'emont}
  \s\MYsex      {\male}
  \s\MYfile     {jones.tex}
  \s\MYnumber   {}
  \s\MYdesc     {}
  \s\MYplayer   {}
  \s\MYblues    {}
  \s\MYgreens   {\gEconomics{}}
  \s\MYabils    {}
  \s\MYitems    {\iMacroLabor{}\iMacroWeapons{}}
  \s\MYwhites   {}
}

\NEW{PC}{\cJuliet}{
  \s\MYname     {Parallax Bernadani}
  \s\MYfile     {juliet.tex}
  \s\MYsex      {\female}
  \s\MYnumber   {}
  \s\MYdesc     {}
  \s\MYplayer   {}
  \s\MYblues    {\bFamilyB{}}
  \s\MYgreens   {\gEconomics{}\gSuccession{}}
  \s\MYabils    {\aTradeJuliet{}}
  \s\MYitems    {}
  \s\MYwhites   {}
}

\NEW{PC}{\cOrotine}{
  \s\MYname     {Orotine}
  \s\MYsex      {\female}
  \s\MYfile     {orotine.tex}
  \s\MYnumber   {}
  \s\MYdesc     {}
  \s\MYplayer   {}
  \s\MYblues    {\bImmortals{}\bCity{}}
  \s\MYgreens   {\gEconomics{}\gImmortals{orotine}}
  \s\MYabils    {\aTradeCity{}\aImport{}\aImport{}}
  \s\MYitems    {\iMacroParts{}}
  \s\MYwhites   {}
  \s\MYmems     {\mBondAliasB{}}
}

\NEW{PC}{\cPatriarchA}{
  \s\MYname     {Razvan Antonescu}
  \s\MYsex      {\male}
  \s\MYfile     {patriarch1.tex}
  \s\MYnumber   {}
  \s\MYdesc     {}
  \s\MYplayer   {}
  \s\MYblues    {\bFamilyA{}}
  \s\MYgreens   {\gEconomics{}}
  \s\MYabils    {\aSparkA{}\aSparkC{}\aSparkD{}\aTradeFA{}\aMine{}\aSabotage{}}
  \s\MYitems    {\iMacroParts{}\iMacroParts{}\iMacroLabor{}}
  \s\MYwhites   {}
}

\NEW{PC}{\cPatriarchC}{
  \s\MYname     {Chelus Cyclemides}
  \s\MYsex      {\male}
  \s\MYfile     {patriarch3.tex}
  \s\MYnumber   {}
  \s\MYdesc     {}
  \s\MYplayer   {}
  \s\MYblues    {\bFamilyC{}}
  \s\MYgreens   {\gEconomics{}\gImmortals{patriarch}}
  \s\MYabils    {\aSparkA{}\aSparkE{}\aTradeFC{}\aFabricateWeapons{}\aFabricateWeapons{}\aPiracy{}}
  \s\MYitems    {\iMacroLabor{}}
  \s\MYwhites   {}
}

\NEW{PC}{\cPirate}{
  \s\MYname     {Perigee Bernadani}
  \s\MYsex      {\female}
  \s\MYfile     {pirate.tex}
  \s\MYnumber   {}
  \s\MYdesc     {}
  \s\MYplayer   {}
  \s\MYblues    {\bFamilyB{}}
  \s\MYgreens   {\gEconomics{}\gImmortals{pirate}\gSuccession{}}
  \s\MYabils    {\aSparkD{}\aPiracy{}\aPiracy{}\aPiracy{}\aUpgradePiracy{}\aTradePirate{}}
  \s\MYitems    {\iMacroLabor{}\iMacroLabor{}}
  \s\MYwhites   {}
}
\NEW{Name}{\cPirateOldName}{
  \s\MYname     {OldPirateName}
}

\NEW{PC}{\cPoisoner}{
  \s\MYname     {Tesseract Bernadani}
  \s\MYsex      {\female}
  \s\MYfile     {poisoner.tex}
  \s\MYnumber   {}
  \s\MYdesc     {}
  \s\MYplayer   {}
  \s\MYblues    {\bFamilyB{}}
  \s\MYgreens   {\aSparkB{}\aSparkC{}\gEconomics{}\gSuccession{}}
  \s\MYabils    {\aTradePoisoner{}\aSabotage{}}
  \s\MYitems    {}
  \s\MYwhites   {}
}

\NEW{PC}{\cPopulist}{
  \s\MYname     {Helix Bernadani}
  \s\MYsex      {\female}
  \s\MYfile     {populist.tex}
  \s\MYnumber   {}
  \s\MYdesc     {}
  \s\MYplayer   {}
  \s\MYblues    {\bFamilyB{}}
  \s\MYgreens   {\gEconomics{}\gSuccession{}\nDestroyCastle{}}
  \s\MYabils    {\aSparkA{}\aSparkB{}\aSparkD{}\aSparkA{}\aTradePopulist{}\aSabotage{}}
  \s\MYitems    {}
  \s\MYwhites   {}
  \s\MYmems     {\mBondAlias{}}
}

\NEW{PC}{\cRomeo}{
  \s\MYname     {Dorin Antonescu}
  \s\MYsex      {\male}
  \s\MYfile     {romeo.tex}
  \s\MYnumber   {}
  \s\MYdesc     {}
  \s\MYplayer   {}
  \s\MYblues    {\bFamilyA{}}
  \s\MYgreens   {}
  \s\MYabils    {\aTradeFA{}}
  \s\MYitems    {}
  \s\MYwhites   {}
  \s\MYmems {\mRomeoDeath{}}
}

\NEW{PC}{\cSpacer}{
  \s\MYname     {Shapechanged}
  \s\MYsex      {\female}
  \s\MYfile     {spacer.tex}
  \s\MYnumber   {}
  \s\MYdesc     {}
  \s\MYplayer   {}
  \s\MYblues    {}
  \s\MYgreens   {\nMoon{}}
  \s\MYabils    {\aSparkC{}\aSparkD{}}
  \s\MYitems    {}
  \s\MYwhites   {}
}

\NEW{PC}{\cSpacerRestored}{
  \s\MYname     {Shapechanged with memories restored}
  \s\MYsex      {\cSpacer{\MYsex}}
  \s\MYfile     {spacerrestored.tex}
  \s\MYnumber   {}
  \s\MYdesc     {}
  \s\MYplayer   {}
  \s\MYblues    {\bFamilyB{}}
  \s\MYgreens   {\gEconomics{}\gSuccession{}}
  \s\MYabils    {\aTradeSpacer{}}
  \s\MYitems    {}
  \s\MYwhites   {}
}

\newcommand{\trappedNumber}{???}

\NEW{PC}{\cTrapped}{
  \s\MYname     {Trapped}
  \s\MYsex      {\male}
  \s\MYfile     {trapped.tex}
  \s\MYnumber   {\trappedNumber}
  \s\MYdesc     {}
  \s\MYplayer   {}
  \s\MYblues    {}
  \s\MYgreens   {}
  \s\MYabils    {}
  \s\MYitems    {}
  \s\MYwhites   {}
}

\NEW{PC}{\cYounger}{
  \s\MYname     {Vasile Antonescu}
  \s\MYsex      {\male}
  \s\MYfile     {younger.tex}
  \s\MYnumber   {}
  \s\MYdesc     {}
  \s\MYplayer   {}
  \s\MYblues    {\bFamilyA{}}
  \s\MYgreens   {}
  \s\MYabils    {\aSparkA{}\aSparkC{}\aSparkD{}}
  \s\MYitems    {}
  \s\MYwhites   {}
}

\NEW{Name}{\cOldHeterodyne}{
  \s\MYname     {Igneous Heterodyne} %Consumed the water of the Dyne, then exploded.
  \s\MYsex      {\jbsex}
}


\NEW{Name}{\cOldGoodJager}{
  \s\MYname     {GOOD JAGER'S REAL NAME} %Consumed the water of the Dyne, then exploded.
  \s\MYsex      {\female}
}

\NEW{Name}{\cFamCAncestor}{
  \s\MYname     {Clemmys Cyclemides}
  \s\MYsex      {\male}
}

\NEW{Name}{\cAdopteeReal}{
  \s\MYname     {Isomorphism Bernadani}
  \s\MYsex      {\male}
}

\NEW{Name}{\cPatriarchB}{
  \s\MYname     {Andrei Bernadani}
  \s\MYsex      {\male}
}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
